UMLGRAPH_HOME = $(HOME)/lib/UMLGraph-5.4/lib

JAVA_HOME = /usr/lib/jvm/java-6-openjdk-amd64

dot_opts = -Tps2

all : EntityCD.pdf BoundaryCD.pdf ControlCD.pdf DetailViewSM.pdf ListViewSM.pdf MouseSM.pdf BreedingPairSM.pdf ExperimentSM.pdf

%.ps : %.java
	java -cp $(UMLGRAPH_HOME)/UmlGraph.jar:$(JAVA_HOME)/lib/tools.jar \
		org.umlgraph.doclet.UmlGraph -compact -private -output - $< |\
		dot $(dot_opts) -Elabeldistance=1.3 -o$@

%.ps : %.dot
	dot $(dot_opts) -o$@ $<

%.pdf : %.ps
	ps2pdf $<

clean :
	-rm *.pdf *.ps
